﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MixScript.BLL.FI
{
    public class rptManufacturedCost : cBaseBLL
    {

        public rptManufacturedCost()
        { }

        public bool SubGroup(out DataTable dt, bool type)
        {
            string sSql;
            if (type)
                sSql = "SELECT acctnum code,acctname name FROM accaccounts WHERE acctnum LIKE '6%'";
            else
                sSql = @"SELECT subnum code,subname  name FROM accsubgroup WHERE subnum Like '6%'";
            try
            {
                dt = Dbserver.ExecuteQuery(sSql, "rpt");
                return dt.Rows.Count > 0;
            }
            catch (Exception ex) { throw ex; }

        }
        public bool FinishGood(out DataTable dt)
        {

            string sSql = @"SELECT fg_id ID,style_no name FROM mkt_finishgood";
            try
            {
                dt = Dbserver.ExecuteQuery(sSql, "rpt");
                return dt.Rows.Count > 0;
            }
            catch (Exception ex) { throw ex; }
        }
    }
}
